﻿using Mapster;
using SmartAgricultureService.Tables;

namespace SmartAgricultureService.Models.Tables
{
    public class AreaInfo
    {
        public string Id { get; set; }
        public string Name { get; set; }
        public string Code { get; set; }
        public bool Active { get; set; }
        public bool Delete { get; set; }
        public static TypeAdapterConfig GetAdapterConfig()
        {
            return new TypeAdapterConfig().NewConfig<AreaEntry, AreaInfo>()
                .Map(dest => dest.Id, src => src.Id)
                .Map(dest => dest.Name, src => src.Name)
                .Map(dest => dest.Code, src => src.Code)
                .Map(dest => dest.Active, src => src.Active)
                .Map(dest => dest.Delete, src => src.Delete)
                .Config;
        }
    }
}